/**   
* @Title: JedisClientCluster.java 
* @Package com.taotao.rest.compoent.impl 
* @Description: TODO(用一句话描述该文件做什么) 
* @author hekai   
* @date 2017年3月5日 下午3:41:14 
* @version V1.0   
*/
package com.taotao.rest.compoent.impl;

import org.springframework.beans.factory.annotation.Autowired;

import com.taotao.rest.compoent.JedisClient;

import redis.clients.jedis.JedisCluster;

/** 
* @ClassName: JedisClientCluster 
* @Description: jedis集群版实现类
* @author hekai
* @date 2017年3月5日 下午3:41:14 
*  
*/
public class JedisClientCluster implements JedisClient {
	
	@Autowired
	private JedisCluster jedisCluster;
	
	/* (non-Javadoc)
	 * @see com.taotao.rest.compoent.JedisClient#set(java.lang.String, java.lang.String)
	 */
	@Override
	public String set(String key, String value) {
		return jedisCluster.set(key, value);
	}

	/* (non-Javadoc)
	 * @see com.taotao.rest.compoent.JedisClient#get(java.lang.String)
	 */
	@Override
	public String get(String key) {
		return jedisCluster.get(key);
	}

	/* (non-Javadoc)
	 * @see com.taotao.rest.compoent.JedisClient#hset(java.lang.String, java.lang.String, java.lang.String)
	 */
	@Override
	public Long hset(String key, String item, String value) {
		return jedisCluster.hset(key, item, value);
	}

	/* (non-Javadoc)
	 * @see com.taotao.rest.compoent.JedisClient#hgert(java.lang.String, java.lang.String)
	 */
	@Override
	public String hgert(String key, String item) {
		return jedisCluster.hget(key, item);
	}

	/* (non-Javadoc)
	 * @see com.taotao.rest.compoent.JedisClient#incr(java.lang.String)
	 */
	@Override
	public Long incr(String key) {
		return jedisCluster.incr(key);
	}

	/* (non-Javadoc)
	 * @see com.taotao.rest.compoent.JedisClient#decr(java.lang.String)
	 */
	@Override
	public Long decr(String key) {
		return jedisCluster.decr(key);
	}

	/* (non-Javadoc)
	 * @see com.taotao.rest.compoent.JedisClient#expire(java.lang.String, int)
	 */
	@Override
	public Long expire(String key, int second) {
		return jedisCluster.expire(key, second);
	}

	/* (non-Javadoc)
	 * @see com.taotao.rest.compoent.JedisClient#ttl(java.lang.String)
	 */
	@Override
	public Long ttl(String key) {
		return jedisCluster.ttl(key);
	}

	/* (non-Javadoc)
	 * @see com.taotao.rest.compoent.JedisClient#del(java.lang.String)
	 */
	@Override
	public Long hdel(String key, String item) {
		return jedisCluster.hdel(key, item);
	}

}
